package com.venus.finance.feetype.service.impl;

import java.util.List;

import com.venus.common.service.impl.BaseServiceImpl;
import com.venus.finance.feetype.dao.IFeeTypeDAO;
import com.venus.finance.feetype.service.IFeeTypeService;
import com.venus.model.FeeTypeVO;

public class FeeTypeServiceImpl extends BaseServiceImpl implements
		IFeeTypeService {
	
	private IFeeTypeDAO feeTypeDAO;

	public void setFeeTypeDAO(IFeeTypeDAO feeTypeDAO) { this.feeTypeDAO = feeTypeDAO; }

	@SuppressWarnings("unchecked")
	@Override
	public List<FeeTypeVO> findAllFeeType() {
		return this.feeTypeDAO.exeHql("from FeeTypeVO order by sort");
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<FeeTypeVO> findSubFeeType(Integer iParentFeeTypeId) {
		return this.feeTypeDAO.find("from FeeTypeVO where parentId=? order by sort", iParentFeeTypeId);
	}

	@Override
	public FeeTypeVO getFeeType(Integer iFeeTypeId) {
		return this.feeTypeDAO.getModel(FeeTypeVO.class, iFeeTypeId);
	}
	
	
	
}
